using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using IdentityServer4.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Yozeev.SystemConfig;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 暂存订单
    /// </summary>
    public class ActivityTemp : ByBranchEntity<Guid>
    {
        /// <summary>
        /// 单据号
        /// </summary>
        public string ActivityNo { get; set; }
        /// <summary>
        /// 订单来源
        /// </summary>
        public Guid SourceId { get; set; }
        [ForeignKey("SourceId")]
        public virtual Source Source { get; set; }
        /// <summary>
        /// 航班标识
        /// </summary>
        public Guid ScheduleId { get; set; }
        //[ForeignKey("ScheduleId")]
        //public virtual Schedule Schedule { get; set; }
        /// <summary>
        /// 下单日期
        /// </summary>
        public DateTime ActivityDate { get; set; }
        /// <summary>
        /// 游玩日期
        /// </summary>
        public DateTime PlayDate { get; set; }
        /// <summary>
        /// 会员标识
        /// </summary>
        public Guid CustomerId { get; set; }
        //[ForeignKey("CustomerId")]
        //public virtual Customer Customer { get; set; }
        /// <summary>
        /// 订单分类
        /// </summary>
        public OrderTypeEnum OrderType { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        public PayStatusEnum PayStatus { get; set; }
        /// <summary>
        /// 购票人
        /// </summary>
        public string Buyer { get; set; }
        /// <summary>
        /// 手机号码
        /// </summary>
        public string Mobile { get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public Guid PayMethodId { get; set; }
        [ForeignKey("PayMethodId")]
        public virtual PayMethod PayMethod { get; set; }
        /// <summary>
        /// 支付凭证号
        /// </summary>
        public string VoucherNo { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public decimal TotalQuantity { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        public decimal TotalAmount { get; set; }
        /// <summary>
        /// 取票密码
        /// </summary>
        public string CollectionPwd { get; set; }
        /// <summary>
        /// 取票人
        /// </summary>
        public string Collector { get; set; }
        /// <summary>
        /// 取票码
        /// </summary>
        public string CollectionCode { get; set; }
        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? PayTime { get; set; }
        /// <summary>
        /// 单据标识
        /// </summary>
        public Guid? ActivityId { get; set; }
        //[ForeignKey("ActivityId")]
        //public virtual Activity Activity { get; set; }
        /// <summary>
        /// 旅行社标识
        /// </summary>
        public Guid? TravelAgencyId { get; set; }
        [ForeignKey("TravelAgencyId")]
        public TravelAgency TravelAgency { get; set; }
        public virtual ICollection<ActivityTempDetail> ActivityDetails { get; set; }
        /// <summary>
        /// openid
        /// </summary>
        public string OpenId { get; set; }
    }
}
